﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Character_Creator
{
    public class Race
    {
        private string raceName;
        private string raceSize;
        private string raceReference;
        private int[] abilityScoreAdjustment;
        private List<Ability> racialAbilities;
        private List<string> racialLanguageOptions;

        public string Name
        {
            get { return raceName; }
            private set { raceName = value; }
        }
        public string Size
        {
            get { return raceSize; }
            private set { raceSize = value; }
        }
        public string Reference
        {
            get { return raceReference; }
            private set { raceReference = value; }
        }
        public int[] AbilityScoreAdjustments
        {
            get { return abilityScoreAdjustment; }
            private set
            {
                abilityScoreAdjustment = new int[6];
                for (int score = 0; score < 6; ++score)
                {
                    abilityScoreAdjustment[score] = value[score];
                }
            }
        }
        public List<Ability> RacialAbilities
        {
            get { return racialAbilities; }
            private set { racialAbilities = value; }
        }
        public List<string> LanguageOptions
        {
            get { return racialLanguageOptions; }
            private set { racialLanguageOptions = value; }
        }

        public Race()
        {
            SetRaceName(null);
            SetRaceAbilityScoreAdjustment(null);
            SetRacialAbilities(null);
            SetLanguageOptions(null);
        }
        public Race(string name, string size, List<Ability> abilities, int[] adjusts, List<string> languages)
        {
            SetRaceName(name);
            SetRaceSize(size);
            SetRaceAbilityScoreAdjustment(adjusts);
            SetRacialAbilities(abilities);
            SetLanguageOptions(languages);
        }

        public override string ToString()
        {
            return Name;
        }

        public void SetRaceName(string name)
        {
            Name = name;
        }
        public void SetRaceSize(string size)
        {
            Size = size;
        }
        public void SetRaceAbilityScoreAdjustment(int[] adjusts)
        {
            AbilityScoreAdjustments = adjusts;
        }
        public void SetRacialAbilities(List<Ability> abilities)
        {
            RacialAbilities = abilities;
        }
        public void SetLanguageOptions(List<string> languages)
        {
            LanguageOptions = languages;
        }
    }
}
